#!/usr/bin/env python

from CommonLib import msg

def info(host_config, action_type):
    
    if host_config['section'] == 'WAS':
        
        if host_config['type'] == 'SERVER' or host_config['type'] == 'S_SERVER':
            
            msg(host_config['section'] + ':' + host_config['type'] + ':' + host_config['name'] + ':' + host_config['server'] + " \n" + action_type + ' finished.' )
        
        elif host_config['type'] == 'DMGR' or host_config['type'] == 'S_DMGR':
            
            msg(host_config['section'] + ':' + host_config['type'] + ':' + host_config['name']  + " \n" + action_type + ' finished.' )
        
        elif host_config['type'] == 'NODE' or host_config['type'] == 'S_NODE':
            
            msg(host_config['section'] + ':' + host_config['type'] + ':' + host_config['name']  + " \n" + action_type + ' finished.' )
                 
        else:
            
            print 'the WAS type: ' + host_config['type'] + 'is unknown.'
        
    elif host_config['section'] == 'APACHE':
        
        msg(host_config['section'] + " \n" + action_type + ' finished.' )
    
    elif host_config['section'] == 'TOMCAT':
        
        msg(host_config['section'] + " \n" + action_type + ' finished.' )
        
    elif host_config['section'] == 'DB2':
        
        msg(host_config['id'] + ':' + host_config['section'] + " \n" + action_type + ' finished.' )
        
    elif host_config['section'] == 'AIX':
        
        msg(host_config['id'] + ':' + host_config['section'] + " \n" + action_type + ' finished.' )
    
    else:
        
        print 'the section type: ' + host_config['section'] + ' is unknown.'